import request from '@/utils/request'

// get 获得打折活动列表数据
export function getAnnouncementList(params) {
  return request({
    url: '/ops/announcement/list',
    method: 'get',
    params
  })
}

// get 删除网站公告数据
export function delAnnouncement(params) {
  return request({
    url: '/ops/announcement/delete',
    method: 'get',
    params: { id: params }
  })
}

// post 修改网站公告数据
export function updateAnnouncement(data) {
  return request({
    url: '/ops/announcement/revise',
    method: 'post',
    data
  })
}

// post 创建网站公告数据
export function addAnnouncement(data) {
  return request({
    url: '/ops/announcement/add',
    method: 'post',
    data
  })
}
